ncsi_over_mctp_sources = [
  'ncsi_over_mctp.cpp',
  'ncsi_over_mctp_huawei.cpp',
  'ncsi_over_mctp_standard.cpp',
  'ncsi_over_mctp_wx.cpp',
]

ncsi_over_mctp_headers = [
  'ncsi_over_mctp.h',
  'ncsi_over_mctp_huawei.h',
  'ncsi_over_mctp_standard.h',
  'ncsi_over_mctp_wx.h',
]

libncsi_over_mctp = shared_library(
  'dev_ncsi_over_mctp',
  ncsi_over_mctp_sources,
  include_directories: dev_inc_dir,
  dependencies: [libmcpp_deps, libmctp_dep],
  install: true,
  install_dir: lib_dir,
)

libncsi_over_mctp_dep = declare_dependency(
  link_with: libncsi_over_mctp,
  include_directories: [dev_inc_dir],
  dependencies: [libmcpp_deps, libmctp_dep],
)

install_headers(ncsi_over_mctp_headers, install_dir: install_inc_dir / 'ncsi_over_mctp')

if build_tests and meson_build
  custom_target(
    'copy_dev_ncsi_over_mctp',
    output: 'copy_dev_ncsi_over_mctp',
    command: ['cp', libncsi_over_mctp.full_path(), lib_dir],
    depends: libncsi_over_mctp,
    build_by_default: true,
  )
endif